<template>
	<view v-if="showModalStatus">
		<!-- 变暗的背景 -->
		<view class="mask" @tap="close"></view>
		<!-- 底部弹出框 -->
		<view :animation="animationData" class="bottom_box">
			<view class="beauty_flex beauty_title">
				<text class="title_box text-white f-desc">美颜设置</text>
				<image class="back_xx" @tap="close" src="@/static/zhibo/guanbi.png" />
			</view>
	<!-- 		<view class="mg-l">
				<view class="beauty_flex">
					<text class="text-white f-desc">光滑</text>
					<text class="text-white f-desc">{{ duration0 }}</text>
				</view>
				<slider @changing="durationChange0" activeColor="rgb(121, 199, 145)" :value="duration0" min="1" max="9"
					block-size="20" />
			</view> -->
			<view class="mg-l">
				<view class="beauty_flex">
					<text class="text-white f-desc">磨皮</text>
					<text class="text-white f-desc">{{ duration1 }}</text>
				</view>
				<slider @changing="durationChange1" activeColor="rgb(121, 199, 145)" :value="duration1" min="1" max="9"
					block-size="20" />
			</view>
		<!-- 	<view class="mg-l">
				<view class="beauty_flex">
					<text class="text-white f-desc">朦胧</text>
					<text class="text-white f-desc">{{ duration2 }}</text>
				</view>
				<slider @changing="durationChange2" activeColor="rgb(121, 199, 145)" :value="duration2" min="1" max="9"
					block-size="20" />
			</view> -->


			<view class="mg-l">
				<view class="beauty_flex">
					<text class="text-white f-desc">美白</text>
					<text class="text-white f-desc">{{ duration3 }}</text>
				</view>
				<slider @changing="durationChange3" activeColor="rgb(121, 199, 145)" :value="duration3" min="1" max="9"
					block-size="20" />
			</view>
			<view class="mg-l">
				<view class="beauty_flex text-white">
					<text class="text-white f-desc">红润</text>
					<text class="text-white f-desc">{{ duration4 }}</text>
				</view>
				<slider @changing="durationChange4" activeColor="rgb(121, 199, 145)" :value="duration4" min="1" max="9"
					block-size="20" />
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			'showModalStatus': {
				type: Boolean,
				default: false
			},

			'duration0': {
				type: Number,
				default: 1
			},

			'duration1': {
				type: Number,
				default: 1
			},
			'duration2': {
				type: Number,
				default: 1
			},
			'duration3': {
				type: Number,
				default: 1
			},
			'duration4': {
				type: Number,
				default: 1
			},
		},
		data() {
			return {

			}
		},
		methods: {
			durationChange0(e) {
				this.$emit("durationChange0", e.detail.value)
			},
			durationChange1(e) {
				this.$emit("durationChange1", e.detail.value)
			},
			// durationChange2(e) {
			// 	this.$emit("durationChange2", e.detail.value)
			// },
			durationChange3(e) {
				this.$emit("durationChange3", e.detail.value)
			},
			durationChange4(e) {
				this.$emit("durationChange4", e.detail.value)
			},
			close() {
				this.$emit("closeBeauty")
			}
		}
	}
</script>

<style scoped lang="scss">
	.text-white {
		color: #fff;
	}

	.back_xx {
		width: 30rpx;
		height: 30rpx;
		margin-right: 30rpx;
	}

	/*底部框 */
	.bottom_box {
		padding: 40rpx;
		height: 550rpx;
		width: 750rpx;
		position: fixed;
		bottom: 0;
		left: 0;
		z-index: 2000;
		background: rgb(26, 25, 30);
		border-radius: 40rpx 40rpx 0 0;
	}

	/*遮罩层  */
	.mask {
		width: 800rpx;
		height: 1080rpx;
		position: fixed;
		top: 0;
		left: 0;
		overflow: hidden;
		z-index: 1000;
	}

	.title_box {
		text-align: center;
		height: 51rpx;
		line-height: 51rpx;
	}

	.beauty_title {
		width: 385rpx;
		margin-left: 300rpx;
	}

	.beauty_flex {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		margin: 0 40rpx;
		align-items: center;
	}

	.mg-l {
		margin: 30rpx auto 0;
	}
</style>